
import viteBaseConfig from "./vite.config.base";
import viteDevConfig from "./vite.config.dev";
import viteProdConfig from "./vite.config.prod";

import { defineConfig } from 'vite'

const envResolver = {
    'build': ():object => {
      console.log('生产环境。。。')
      return Object.assign({},viteBaseConfig,viteProdConfig)
    },
    'serve': ():object => {
      console.log('开发环境。。。。')
      return Object.assign({},viteBaseConfig,viteDevConfig)
    }
}

// https://vitejs.dev/config/
export default defineConfig(({command}) => {
  return envResolver[command]()
})
